%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/rbac.updatePerson"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 19, 38, 20, 2<br /><br />1: PgUpdateSingle[16]<br />2: <br />ᐳ: Object[21]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 2, 16, 21<br /><br />ROOT Object{1}ᐸ{result}ᐳ[21]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 16, 32<br /><br />ROOT PgUpdateSingle{1}ᐸperson(id;)ᐳ[16]<br />1: <br />ᐳ: 23, 22, 24, 25, 26, 27, 28<br />2: PgSelect[29]<br />3: PgSelectRows[34]<br />ᐳ: First[33], PgSelectSingle[35]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 35, 16<br /><br />ROOT PgSelectSingle{3}ᐸfrmcdc_wrappedUrlᐳ[35]"):::bucket
    Bucket5("Bucket 5 (listItem)<br /><br />ROOT __Item{5}ᐸ25ᐳ[36]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3
    Bucket3 --> Bucket4 & Bucket5

    %% plan dependencies
    __InputObject9{{"__InputObject[9∈0] ➊<br />More deps:<br />- Constantᐸ'Budd Daay'ᐳ[39]<br />- Constantᐸ[ 'BD', 'Buddy' ]ᐳ[11]<br />- Constantᐸnullᐳ[12]<br />- Constantᐸ'buddy@example.com'ᐳ[40]"}}:::plan
    __InputObject14{{"__InputObject[14∈0] ➊<br />More deps:<br />- Constantᐸ'http://buddy.com'ᐳ[41]"}}:::plan
    __InputObject14 --> __InputObject9
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ3ᐳ[38]"}}:::plan
    __InputObject9 --> __InputObject6
    Object19{{"Object[19∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access17{{"Access[17∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access18{{"Access[18∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access17 & Access18 --> Object19
    ApplyInput20{{"ApplyInput[20∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput20
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 4"]:::plan
    PgUpdateSingle16[["PgUpdateSingle[16∈1] ➊<br />ᐸperson(id;)ᐳ<br />More deps:<br />- Constantᐸ3ᐳ[38]"]]:::sideeffectplan
    Object19 & ApplyInput20 --> PgUpdateSingle16
    Object21{{"Object[21∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgUpdateSingle16 --> Object21
    Object32{{"Object[32∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access30{{"Access[30∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access31{{"Access[31∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access30 & Access31 --> Object32
    PgSelect29[["PgSelect[29∈3] ➊<br />ᐸfrmcdc_wrappedUrlᐳ"]]:::plan
    PgClassExpression28{{"PgClassExpression[28∈3] ➊<br />ᐸ__person__.”site”ᐳ"}}:::plan
    Object32 & PgClassExpression28 --> PgSelect29
    PgClassExpression22{{"PgClassExpression[22∈3] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    Access23{{"Access[23∈3] ➊<br />ᐸ16.tᐳ"}}:::plan
    Access23 --> PgClassExpression22
    PgUpdateSingle16 --> Access23
    PgClassExpression24{{"PgClassExpression[24∈3] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgClassExpression22 o--o PgClassExpression24
    PgClassExpression25{{"PgClassExpression[25∈3] ➊<br />ᐸ__person__.”aliases”ᐳ"}}:::plan
    Access23 --> PgClassExpression25
    PgClassExpression26{{"PgClassExpression[26∈3] ➊<br />ᐸ__person__.”about”ᐳ"}}:::plan
    PgClassExpression24 o--o PgClassExpression26
    PgClassExpression27{{"PgClassExpression[27∈3] ➊<br />ᐸ__person__.”email”ᐳ"}}:::plan
    PgClassExpression26 o--o PgClassExpression27
    Access23 --> PgClassExpression28
    First33{{"First[33∈3] ➊"}}:::plan
    PgSelectRows34[["PgSelectRows[34∈3] ➊"]]:::plan
    PgSelectRows34 --> First33
    PgSelect29 --> PgSelectRows34
    PgSelectSingle35{{"PgSelectSingle[35∈3] ➊<br />ᐸfrmcdc_wrappedUrlᐳ"}}:::plan
    First33 --> PgSelectSingle35
    PgClassExpression37{{"PgClassExpression[37∈4] ➊<br />ᐸ__frmcdc_w...rl__.”url”ᐳ"}}:::plan
    PgSelectSingle35 --> PgClassExpression37
    __Item36[/"__Item[36∈5]<br />ᐸ25ᐳ"\]:::itemplan
    PgClassExpression25 ==> __Item36

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject9,__InputObject14,Access17,Access18,Object19,ApplyInput20 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgUpdateSingle16,Object21 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,Access30,Access31,Object32 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression22,Access23,PgClassExpression24,PgClassExpression25,PgClassExpression26,PgClassExpression27,PgClassExpression28,PgSelect29,First33,PgSelectRows34,PgSelectSingle35 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,PgClassExpression37 bucket4
    classDef bucket5 stroke:#7fff00
    class Bucket5,__Item36 bucket5

    %% implicit side effects
    PgUpdateSingle16 -.-o Access30
    PgUpdateSingle16 -.-o Access31

